package com.ruoyi.device.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.device.api.domain.DeviceOnline;
import com.ruoyi.device.api.factory.RemoteDeviceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteDeviceService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteDeviceFallbackFactory.class)
public interface RemoteDeviceService {
    @PutMapping("/deviceOnline/updateDeviceStatus")
    R<Boolean> updateDeviceStatus(@RequestBody DeviceOnline device, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
